void main(List<String> args) {
  /*ChPerson chPerson = ChPerson();
  chPerson.eat();
  EnPerson enPerson = EnPerson();
  enPerson.eat();*/
  Person chinesePerson = Person(); //实列化类
  chinesePerson.say();
  Person En = Person();
  En.nation = '英国';
  En.say();

}
class Person {
  String name = '昊';  //属性
  String nation = '中国';
  String sex = '男';
  int age = 18;
  void say(){ //行为方法
    print('会说$nation语言');
  }
  // void eat(){

  // }
}
/*
class ChPerson extends Person{
  @override //覆写，重写
  void eat(){
    print('筷子');
  }
}
class EnPerson extends Person{
   @override //覆写，重写
  void eat(){
    print('刀叉');
  }
}
*/